package com.example.policymode2;

import java.io.File;

public class TestStrategy {
    public static void main(String args []){
        File file = new File("D:\\data\\test.txt");
        //调用策略1 实现加密
        FileEncode fileEncode = new FileEncode(new AESEncode());
        fileEncode.encryptFile(file);
        //调用策略2 实现加密
        fileEncode = new FileEncode(new Base64Encode());
        fileEncode.encryptFile(file);
    }
}